<?php include_once '../../../include/inc_session.php';	

	if(isset($_GET['Identifiant_personne']) && !empty($_GET['Identifiant_personne']))
	{ // Vérifier si Identifiant_personne est passé en paramètre
		$idPersonne = $_GET['Identifiant_personne'];
	}
	
	
	$oJustif = new dataObject_justificatif();
	
	$aList = $oJustif->justificatif_getListForPersonne($idPersonne);
	
	$nommodule2="Liste des justificatifs";
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Justficatif</title>
<link rel="stylesheet" type="text/css" href="../../../css/main.css" />
            <link rel="stylesheet" type="text/css" href="list.css" />
			<!--[if IE 7]>
            	<link rel="stylesheet" type="text/css" href="../../css/ie7.css" />
            	<link rel="stylesheet" type="text/css" href="form_ie7.css" />
            <![endif]-->
            
			<script language="Javascript">
            <!--
                function modifier(choix)
                {
                    var modifAct = document.getElementById("modifAct");

        			modifAct.href = 'saisiejustificatif.php?Identifiant_personne=<?php echo $idPersonne; ?>&Identifiant_justificatif=' + choix ;
        
                }
            //-->
            </script></head>

</head>

<body>
<div id="sf_menu1">
	<h3><?php echo $oBloc->_MENU_NOM ?></h3>
	<div id="information_erreur" class="false">
        <ul id="message">
        	<li><?php $aMsg =$oForm->getValidMessage(); echo (!empty($aMsg))? $aMsg[0]['message'] : ''; ?></li>
        </ul>
    </div>
    
</div>
<div class="cleared"></div>

<div class="corps1">
<!--/***************************************/-->
	<div class="imgleft"></div>
	<div class="imgmiddle">
		<div class="btn">
        	<span class="btnleft"></span>
            <span class="btnmiddle">
            	<h5><?php echo $oFonction->_MENU_AFFICHE; ?></h5>
            </span><span class="btnright"></span>
        </div>
		<div class="btn1">
        	<span class="btnleft"></span>
            <span class="btnmiddle">
            	<h5><?php echo $nommodule2; ?></h5>
            </span><span class="btnright"></span>
        </div>
		<div class="cleared"></div>
<table class="tab_liste">
 <tr id="niv1" >
 	<td class="td1">&nbsp;</td>
    <td class="td2">TYPE</td>
    <td class="td3">VALEUR</td>
   </table>
   
  <div class="content_table bright">
  <table class="tab_list">
  <?php 
  foreach($aList as $i => $aRow) 
  { 
  	$sLibType = dataObject_elementdico::elementdico_getNomFromCode($aRow['Type_justificatif'], dataObject_dictionnaire::TYPE_JUSTIFICATIF);
	if (count($aList) > 0) 
	{ // Show if recordset not empty
 ?>
    <tr <?php if($i%2==0) echo 'class="colorligne"'; ?>>
  		<td class="td1">
      	<input onClick="modifier(this.value);" type="radio" name="choix" id="choix" value="<?php echo $aRow['Identifiant_justificatif']; ?>" />
      </td>
  
      <td class="td2"><?php echo $sLibType; ?></td>
      <td class="td3"><?php echo $aRow['Valeur_justificatif']; ?></td>
      
    </tr>
    <?php 
	} 
  }?>
      
</table></div>

		<div id="buttonright"><a href="saisiejustificatif.php?Identifiant_personne=<?php echo $idPersonne?>"><span class="btleft"></span><span class="btmiddle">Créer</span><span class="btright"></span></a></div>

		<div id="buttonright"><a id="modifAct" href="#"><span class="btleft"></span><span class="btmiddle">Modifier</span><span class="btright"></span></a></div>
					
</div>
    

<div class="imgright"></div>	
<div class="bt1">
	<a href="../editpersonne.php?Identifiant_personne=<?php echo $_GET['Identifiant_personne'];?>&modc_justificatif=0">
    	<span class="btleft"></span>
        <span class="btmiddle">Retour</span>
        <span class="btright"></span>
    </a>
</div>
			
<div class="cleared"></div>

</div>
</body>
</html>
<?php
include_once PATH_INCLUDE.'inc_pied_page.php';

?>
